<template>
  <!-- 点位详情弹出框 -->
  <div class="list">
    <el-dialog
      title="合作商名称"
      :visible="detailsVisible"
      width="40%"
      @open="opneDialog"
      @close="closeDialog"
    >
      <el-form label-width="100px" class="demo-ruleForm">
        <el-row style="padding-left: 30px">
          <el-col
            :span="12"
          ><div class="grid-content bg-purple">
            <el-form-item label="合作商名称:">
              <span>{{ item.name }} </span></el-form-item>
          </div>
          </el-col>
          <el-col
            :span="12"
          ><div class="grid-content bg-purple-light">
            <el-form-item label="联系人:">
              <span>{{ item.contact }} </span></el-form-item>
          </div>
          </el-col>
          <el-col
            :span="12"
          ><div class="grid-content bg-purple-light">
            <el-form-item label="联系电话:">
              <span>{{ item.mobile }} </span></el-form-item>
          </div>
          </el-col>
          <el-col
            :span="12"
          ><div class="grid-content bg-purple-light">
            <el-form-item label="分成比例:">
              <span>{{ `${item.ratio}%` }} </span></el-form-item>
          </div>
          </el-col>
        </el-row>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    detailsVisible: {
      type: Boolean,
      default: () => {}
    },
    // eslint-disable-next-line vue/prop-name-casing
    item: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {
      // details补货详情弹出框
    }
  },
  methods: {
    // 1.父组件点击补货详情弹出框的时候把Id传递过来--弹出层一打开的说实话马上请求后端数据
    // 然后渲染页面
    async opneDialog() {
    },
    // 2.关闭弹出层触发父组件自定义事件
    closeDialog() {
      this.$emit('closeDialog')
    }
  }
}
</script>

<style lang="scss">
.list {
  .scrollbar {
    .el-scrollbar {
      // display: flex;
      // justify-content: space-around;
      padding-bottom: 20px;
      padding-right: -5px;
    }
    .el-scrollbar__wrap {
      // 必要的
      overflow: scroll;
      overflow-x: hidden;
      margin-right: -80px;
      //width: 180%;  //隐藏侧边默认滚动条 （达不到效果可以自己试着微调） 如解决不了可尝试用 `margin-right -60px`
      height: 105%; //隐藏底部滚动条  （100%如果达不到效果可以试着用110%）
    }
  }
  .el-dialog {
    border-radius: 10px;
    .el-dialog__header .el-dialog__title {
      color: #333333;
      font-size: 16px;
      font-weight: bold;
    }
    .el-dialog__header {
      border-radius: 10px;
      background-color: #fff;
    }
    .el-icon-close:before {
      color: #909399;
    }
    .el-dialog__body {
      padding: 15px 20px;
    }
  }
  .el-table {
    position: unset;
  }
  .el-table thead {
    color: #666666 !important;
  }
  .el-table td,
  .el-table th.is-leaf {
    border-bottom: 0 !important;
  }
  .el-table--fit {
    margin-top: 10px;
  }
  .el-table td {
    padding: 5px;
  }
}
</style>
